package ru.michaeltyan.familyconnector.businessobjects.impl;

import ru.michaeltyan.familyconnector.beans.Foodstuff;
import ru.michaeltyan.familyconnector.businessobjects.FoodstuffBusinessObject;
import ru.michaeltyan.familyconnector.dao.FoodstuffDao;

public class FoodstuffBusinessObjectImpl implements FoodstuffBusinessObject {
	private FoodstuffDao foodstuffDao;

	public void setFoodstuffDao(FoodstuffDao foodstuffDao) {
		this.foodstuffDao = foodstuffDao;
	}

	public void save(Foodstuff foodstuff) {
		foodstuffDao.save(foodstuff);
	}

	public void update(Foodstuff foodstuff) {
		foodstuffDao.update(foodstuff);
	}

	public void delete(Foodstuff foodstuff) {
		foodstuffDao.delete(foodstuff);
	}

	public Foodstuff findByFoodstuffName(String foodstuffName) {
		return foodstuffDao.findByName(foodstuffName);
	}

}
